package com.crocodileQ.common.utils;


/***
 * @Author 鳄鱼杆
 * @Date 2025/4/7 20:28
 */
public class GenerateContextUtil {

    /**
     * 生成随机用户名
     * @return
     */
    public static String generateUserName(){
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 10; i++) {
            int type = (int) (Math.random() * 3);
            switch (type){
                case 0:
                    sb.append((char) (Math.random() * 26 + 'a'));
                    break;
                case 1:
                    sb.append((char) (Math.random() * 26 + 'A'));
                    break;
                case 2:
                    sb.append((char) (Math.random() * 10 + '0'));
                    break;
            }
        }
        return sb.toString();
    }


}
